use serde::{Deserialize, Serialize};

#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum RelationTypeOperator {
    #[default]
    #[serde(rename = "equal")]
    Equal,
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum RelationOperator {
    #[default]
    #[serde(rename = "equal")]
    Equal,
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum ModelOperator {
    #[default]
    String,
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum ValueOperator {
    #[default]
    #[serde(rename = "equal")]
    Equal,
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum StringOperator {
    #[default]
    #[serde(rename = "equal")]
    Equal,
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum BitOperator {
    #[default]
    #[serde(rename = "&")]
    And,
    #[serde(rename = "|")]
    Or,
    #[serde(rename = "~")]
    Not,
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum LogicalOperator {
    #[default]
    #[serde(rename = "and")]
    And,
    #[serde(rename = "or")]
    Or,
    #[serde(rename = "comparsion")]
    Comparsion(ComparsionOperator),
    #[serde(rename = "bit-operator")]
    BitOperator(BitOperator),
}

#[derive(Debug, Default, Serialize, Deserialize, Clone, PartialEq)]
pub enum ComparsionOperator {
    #[serde(rename = "contains")]
    Contains,
    #[serde(rename = "not contains")]
    NotContains,
    #[serde(rename = "start with")]
    StartWith,
    #[serde(rename = "end with")]
    EndWith,
    #[default]
    #[serde(rename = "is")]
    Is,
    #[serde(rename = "is not")]
    IsNot,
    #[serde(rename = "empty")]
    Empty,
    #[serde(rename = "not empty")]
    NotEmpty,
    #[serde(rename = "=")]
    Equal,
    #[serde(rename = "≠")]
    NotEqual,
    #[serde(rename = ">")]
    LargerThan,
    #[serde(rename = "<")]
    LessThan,
    #[serde(rename = "≥")]
    LargerThanOrEqual,
    #[serde(rename = "≤")]
    LessThanOrEqual,
    #[serde(rename = "is null")]
    IsNull,
    #[serde(rename = "is not null")]
    IsNotNull,
    #[serde(rename = "in")]
    In,
    #[serde(rename = "not in")]
    NotIn,
    #[serde(rename = "all of'")]
    NotallOfIn,
    #[serde(rename = "exists")]
    Exists,
    #[serde(rename = "not exists")]
    NotExists,
}
